<?php

namespace App\Module\Api\Controllers;
use App\Jobs\sendSms;
use App\Module\Api\Validator\CategoryListValidator;
use App\System\Base\Services\TokenService;
use App\System\Cis\Repositories\CisUserRepository;
use App\System\Cms\Repositories\CmsArtCatRepository;
use App\System\Fina\Repositories\FinaRecordRepository;

/**
 * 分类列表
 * @package App\Module\Admin\Controllers
 */
class CategoryListController extends Controller
{
    public function __construct()
    {
        $this->limit = 1000;
        parent::__construct();
    }

    //主页
    public function index()
    {
        (new CategoryListValidator())->check();
        $action = $this->query->action;
        $data ='';
        $cmsArtCatRepository = CmsArtCatRepository::getInstance();

        if($action == 1)
        {//文章分类列表
            $data = $cmsArtCatRepository->getList();
        }
        return apiResponse($data);
    }

}
